function createManageMenu(){
    
        var parentMenu = [{id:'1001',name:'图片管理'},{id:'1002',name:'文章管理'},{id:'1003',name:'案例展示'}];
        var sonMenu = [{parentID:'1001',name:'上传图片',url:'../module/import/import.jsp'},{parentID:'1001',name:'查看图片',url:'../module/image/imageFrame.jsp'},{parentID:'1002',name:'新增文章',url:'../module/word/addWord.jsp'},{parentID:'1002',name:'查看文章',url:'../module/word/wordFrame.jsp'},{parentID:'1003',name:'上传套图',url:'./anli/uploadImg.jsp'},{parentID:'1003',name:'维护套图',url:'./anli/showAnliImg.do'}];
        $.each(parentMenu, function(index, value){
            createParentMenu(index, value.id, value.name);
        });
        $.each(sonMenu, function(index, value){
            createSonMenu(value.parentID, value.name, value.url);
        });
        
}
function createParentMenu(index, resourceID, menuName){
    
    var $table = $("<table style='white-space:nowrap'></table>");
    
    $table.addClass("mark hidden");
    $table.attr("id", resourceID);
    
    var $tr = $("<tr></tr>");
    $table.append($tr);
    $("#sonMenu").append($table);
    
    
    var $td = $("<td></td>");
    $td.addClass("white13_18b td05");
    $td.attr("id", "menuma" + index);
    
    if (index == 0) {
        $td.addClass("menu_open");
        $table.removeClass("hidden");
    }

    var $a = $("<a style='white-space:nowrap'></a>");
    $a.attr("href", "javascript:void(0);");
    $a.text(menuName);
    $td.append($a);

    $td.click(function(){
        $(".mark").addClass('hidden');
        $("#" + resourceID).removeClass('hidden');
        $(".menu_open").removeClass("menu_open");
        $(this).addClass('menu_open');
    });
    
    
    var $imgTD = $("<td></td>");
    
    var $img = $("<img />");

    $img.attr("src", "../skin/image/m05.jpg");
    $img.attr("width", "2");
    $img.attr("height", "32");
    $imgTD.append($img);
    
    $("#parentMenu").append($td);
    $("#parentMenu").append($imgTD);
}

function createSonMenu(parentID, menuName, url){
    
    var $parentTable = $("#" + parentID);
    
    var $tr = $parentTable.children().children();
    
    var $td = $("<td></td>");
    $td.addClass("blue12_20 menu02_close");
    $td.click(function(){
        $(".red12_20").addClass("blue12_20");
        $(".red12_20").removeClass("red12_20");
        $(this).addClass("red12_20");
        $(this).removeClass('blue12_20');
    });
    
    var $a = $("<a style='white-space:nowrap'></a>");
    $a.text(menuName);
    $a.attr("href", url);
    $a.attr("target", "content");
    
    $td.append($a);
    
    $tr.append($td);
}
